package cn.design;

import cn.design.callback.Student;
import cn.design.callback.Teacher;

/**
 * @author dlq
 * @description
 * @date 2020/9/27 15:14
 * @since 1.0
 */
public class CallBackClientDemo {
    public static void main(String[] args) {
        // 老师 通知 学生做作业 ，然后学生做完作业 回馈(回调)给老师
        //定义一个学生类
        Student student = new Student("小明");
        //定义一个老师类
        Teacher teacher = new Teacher(student);

        //老师现在叫学生做作业了
        teacher.makeStudentDoWork();
    }
}
